Partitioning Grammars and composing Parsers
نویسنده
چکیده
GLR parsers have been criticized by various authors for their potentially large sizes. Other parsers also have individual weaknesses and strengths. Our heterogeneous parsing algorithm is based on GLR parsers that handle the size and other problems by partitioning the grammarduring compilingand assembling the partitioned sub-grammars during parsing. We discuss diierent parsers for diierent grammars and present some intuitive considerations for the partitioning.
منابع مشابه
Simple, Functional, Sound and Complete Parsing for All Context-Free Grammars
Parsers for context-free grammars can be implemented directly and naturally in a functional style known as “combinator parsing”, using recursion following the structure of the grammar rules. However, naive implementations fail to terminate on left-recursive grammars, and despite extensive research the only complete parsers for general contextfree grammars are constructed using other techniques ...
متن کاملLinear Time Parsers for Classes of Non Context Free Languages
Deterministic parsers have been proposed for two-level control grammars. These parsers are efficient in both time and space and are simple extensions of the standard LL(I) and LR( 1) parsers for deterministic context free languages. An important advantage of the parsers proposed here is that existing parser generator tools can be augmented to generate them from grammar specifications. Since the...
متن کاملPractical Dynamic Grammars for Dynamic Languages
Grammars for programming languages are traditionally specified statically. They are hard to compose and reuse due to ambiguities that inevitably arise. PetitParser combines ideas from scannerless parsing, parser combinators, parsing expression grammars and packrat parsers to model grammars and parsers as objects that can be reconfigured dynamically. Through examples and benchmarks we demonstrat...
متن کاملGenerating Eecient Substring Parsers for Brc Grammars
The concept of Bounded Context Parseable grammars is a less restricted variation of Bounded Context grammars a class of grammars that is especially suited for substring parsing. Robust parsing is introduced as a special form of parsing for BCP grammars. The di erences between robust parsing and LR(k) parsing are explored. A method of generating robust parsers is presented and complemented by pe...
متن کاملMulti-parser architecture for query processing
Natural language queries provide a natural means for common people to interact with computers and access to on-line information. Due to the complexity of natural language, the traditional way of using a single grammar for a single language parser leads to an inefficient, fragile, and often very large language processing system. Multi-Parser Architecture (MPA) intends to alleviate these problems...
متن کامل